public class MethodParameter01 {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        AAA aaa = new AAA();
        aaa.swap(a,b);
        System.out.println("main方法中：a="+a+" "+"b="+b);
    }
}
//基本数据类型的传参机制
class AAA{
    public void swap(int a,int b){
        int tmp = a;
        a = b;
        b = tmp;
        System.out.println("交换后：a="+a+" "+"b="+b);
    }
}